package com.kimi.abyss.rbac.api.feign.factory;

import com.kimi.abyss.rbac.api.feign.RemoteSysUserService;
import com.kimi.abyss.rbac.api.feign.fallback.RemoteSysUserServiceFallbackImpl;
import org.springframework.stereotype.Component;
import reactivefeign.FallbackFactory;

/**
 * no-op
 *
 * @author kimi
 * @date 2021/7/19
 */
@Component
public class RemoteSysUserServiceFallbackFactory implements FallbackFactory<RemoteSysUserService> {

    @Override
    public RemoteSysUserService apply(Throwable throwable) {
        RemoteSysUserServiceFallbackImpl fallback = new RemoteSysUserServiceFallbackImpl();
        fallback.setCause(throwable);
        return fallback;
    }

}
